package cn.iocoder.yudao.module.game.dal.mysql.coinLog;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.game.dal.dataobject.coinLog.CoinLogDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.game.controller.admin.coinLog.vo.*;

/**
 * 金币日志 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CoinLogMapper extends BaseMapperX<CoinLogDO> {

    default PageResult<CoinLogDO> selectPage(CoinLogPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CoinLogDO>()
                .likeIfPresent(CoinLogDO::getMemberId, String.valueOf(reqVO.getMemberId()))
                .betweenIfPresent(CoinLogDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CoinLogDO::getId));
    }

}